package com.gyx.lottery.controller.param;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class DrawPrizeParam implements Serializable {
    @NotNull(message = "活动Id不能为空")
    private Long activityId;
    @NotNull(message = "奖品Id不能为空")
    private Long prizeId;
    private String prizeTiers;
    @NotNull(message = "抽奖日期不能为空")
    private Date winningTime;
    @NotEmpty(message = "获奖者名单不能为空")
    @Valid
    private List<User> winnerList;
    @Data
    public static class User{
        @NotNull(message = "获奖者Id不能为空")
        private Long userId;
        @NotNull(message = "获奖者姓名不能为空")
        private String userName;
    }
}
